{template 'header'}
            <div class="row">
                <div class="col-lg-12 ">
                    <div class="panel panel-default">
                        <div class="panel-body">
                            <div class="page-toolbar">
                                <div class="col-sm-6">
                                 <span class="">
                                     <a class="btn btn-primary btn-sm" href="{php echo webUrl('user/role/add')}"><i class="fa fa-plus"></i> 添加新角色</a>
                                 </span>
                                </div>
                                <form action="{php echo webUrl('user.role')}" method="post" class="form-horizontal" form-jump='1'>
                                <div class="col-sm-6 pull-right">
                                    <div class="input-group">
                                        <div class="input-group-select">
                                            <select name="status" class="form-control">
                                                <option value="" selected="">状态</option>
                                                <option value="1"  {if $status==1}selected="selected"{/if}>启用</option>
                                                <option value="0" {if $status=='0'}selected="selected"{/if}>禁用</option>
                                            </select>
                                        </div>
                                        <input type="text" class="input-sm form-control" name="keyword" value="{$keyword}" placeholder="请输入关键词"> <span class="input-group-btn">
                                        <button class="btn btn-primary" type="submit"> 搜索</button> </span>
                                    </div>
                                </div>
                                </form>
                            </div>
                            <table class="table table-hover  bootstrap-datatable datatable ">
                                {if !empty($list)}
                                <thead>
                                <tr>
                                    <th>角色名称</th>
                                    <th>操作员数量</th>
                                    <th>状态</th>
                                    <th>操作</th>
                                </tr>
                                </thead>
                                <tbody>
                                {loop $list $item}
                                <tr>
                                    <td>{$item['rolename']}</td>
                                    <td>{$item['usercount']}</td>
                                    <td>
                                        <span class="{if $item['status']==1}label label-warning{else}label{/if}" data-ajax="{php echo webUrl('user.role.edit_status',array('id'=>$item['id']))}" list-class="{if $item['status']==1}label{else}label label-warning{/if}" list-html="{if $item['status']==1}禁用{else}启用{/if}">{if $item['status']==1}启用{else}禁用{/if}</span>
                                    </td>
                                    <td style="width:100px;">
                                        <div class="link-group">
                                            <a class="btn btn-info"
                                               href="{php echo weburl('user.role.edit', array('id' => $item['id']));}">
                                                <i class="fa fa-edit "></i>
                                            </a>
                                            <a class="btn btn-danger btn-ajax"
                                                href="javascript:vord(0)" data-ajax="{php echo webUrl('user.role.delete',array('id'=>$item['id']))}" title="确认删除？">
                                                <i class="fa fa-trash-o "></i>
                                            </a>
                                        </div>
                                    </td>
                                </tr>
                                {/loop}
                                </tbody>
                                {else}
                                <thead>
                                <tr>
                                    <th colspan="4">暂无数据</th>
                                </tr>
                                </thead>
                                {/if}
                            </table>
                            <hr style="margin: 0px 0px;padding: 0px 0px">
                            {php echo $pager;}
                        </div>
                    </div>
                </div><!--/col-->

            </div><!--/row-->
    {template 'footer'}